<?php
/**
 * Created by PhpStorm.
 * User: sakura
 * Date: 2019/4/27
 * Time: 10:29 PM
 */

namespace app\api\controller;

use app\common\model\Users;

class GetUser extends Api
{

    //是否验证用户token
    protected $needAuth=false;

    //获取用户接口
    public function index()
    {
//        $id = $this->param[''];
        $result = Users::where('id',3)
            ->select();

        if ($result)
        {
            return $this->success($result);
        }

        return $this->error("未获取到数据");
    }
}